package com.litong.modules.system.log.mapper;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath*:spring.xml" })
public class MybatisSpringBean {

  @Autowired
  ApplicationContext ac;

  @Test
  public void getBeans() {
    String[] beanDefinitionNames = ac.getBeanDefinitionNames();
    for (String bean : beanDefinitionNames) {
      System.out.println(bean);
    }
  }
}
